#define _CRT_SECURE_NO_WARNINGS 1
struct ListNode* reverseList(struct ListNode* head) {
    struct ListNode* newhead = head;
    struct ListNode* temp;
    head = NULL;
    while (newhead)
    {
        temp = newhead->next;
        newhead->next = head;
        head = newhead;
        newhead = temp;
    }
    return head;
}